package Prototype.demo02;


import java.util.Date;

/*
客户端:克隆
*/
public class Bilibili {
    public static void main(String[] alrgs) throws CloneNotSupportedException {
        //原型对象v1
        Date date = new Date();
        Video v1 = new Video("ML李嘉图", date);
        //v1克隆v2
        //Video v2 = new Video( "ML李嘉图", date);
        Video v2 = (Video) v1.clone();
        System.out.println("v1=>" + v1);
        System.out.println("v2=>" + v2);
        date.setTime(22131231);
        System.out.println("+++++++++++++++++++++++++++++++++++");
        System.out.println("v1=>" + v1);
        System.out.println("v2=>" + v2);
    }
}
